<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui">
	<ui:composition template="/templates/padraoJSF.xhtml">
		<ui:define name="barraTitulo">Cadastro de Grupo</ui:define>
		<ui:define name="conteudo">
			<h:form id="formGrupo">
				<p:dialog header="Mensagem" id="dialog1" widgetVar="dialog" fixedCenter="true" modal="true" visible="#{facesContext.maximumSeverity != null}">
				   <p:messages/>                     
				</p:dialog>
				<fieldset>
					<p:tabView >
						<p:tab title="Cadastro">						
							<h:panelGrid  columns="3" columnClasses="width150 alinhaDir, width500">
								<h:outputText value=""/>
								<h:outputText value="Os campos com asterisco (*) s&atilde;o de preenchimento obrigat&oacute;rio." styleClass="campoObrigatorio" />
								<h:outputText value=""/>								
								<h:outputText value="Descri&ccedil;&atilde;o:" styleClass=""/>
								<h:column>
									<h:inputText  value="#{controleGrupo.grupo.descricao}" requiredMessage="Campo [DESCRICAO] obrigat&oacute;rio" size="100"/>
								</h:column>
								<h:outputText value="(*)" styleClass="campoObrigatorio" />
								<h:outputText value=""/>
								<h:column>
									<p:panel header="Permiss&atilde;o">
										<h:panelGrid columns="3" columnClasses="width200,  , width200" >
											<h:column />									
												<p:pickList value="#{controleGrupo.listaAreas}" 
													var="area" 
													itemLabel="#{area.descricao}" 
													itemValue="#{area}" 
													converter="converteArea"
													iconOnly="true" effect="bounce">
													<f:facet name="sourceCaption">Todos as &Aacute;reas</f:facet>  
													<f:facet name="targetCaption">&Aacute;reas Selecionadas</f:facet> 
												</p:pickList>
											<h:column />
										</h:panelGrid>					
									</p:panel>
								</h:column>
								<h:outputText value=""/>
							</h:panelGrid>		
						</p:tab>						
					</p:tabView>
				</fieldset>
				<h:commandLink action="#{controleGrupo.gravar}" styleClass="alinhaDir">
					<h:graphicImage url="/images/botoes/btnGravar.png" class="btnAcoes"/>
				</h:commandLink>
				<h:commandLink action="#{controleArea.limpar}">
					<h:graphicImage url="/images/botoes/btnLimpar.png" class="btnAcoes"/>
					<f:ajax render=":formGrupo"/>
				</h:commandLink>
				<h:outputLink value="manutencao.jsf">
					<h:graphicImage url="/images/botoes/btnPesquisar.png" class="btnAcoes"/>
				</h:outputLink>				
				
			</h:form>
		</ui:define>
	</ui:composition>
</html>